package com.mes.spc.rule;

public class SpcRule8 extends SPCCommandbase {
    public int id=8;
    public int warningCount=8;
    public String title="规则8";
    public String description="连续8点落在中心线两侧且无一在1倍sigma区内";
    private int count;
    public boolean excute(double data, double usl, double lsl, double ucl, double lcl, double standard)
    {
        double bu = standard + ucl/ 3;
        double bl = standard + lcl / 3;
        if (data > bu || data < bl)
            count++;
        else
            count = 0;
        if (count >= 8)
            return true;
        return false;
    }

    public int getId() {
        return id;
    }
    public int getWarningCount() {
        return warningCount;
    }
    public String getTitle() {
        return title;
    }
    public String getDescription() {
        return description;
    }
}
